<script>
import { trackGetProjectInfo } from '@/api/pageStats';
  export default {
    filters: {
      scfsFilter(key) {
        const dataMap = {
          1: "资格预审",
          2: "资格后审"
        };
        return dataMap[key];
      },
      zbfsFilter(key) {
        const dataMap = {
          1: "公开招标",
          2: "邀请招标"
        };
        return dataMap[key];
      },
      xmlxFilter(key) {
        const dataMap = {
          A01: "房建",
          A02: "市政",
          A03: "公路",
          A04: "铁路",
          A06: "水运",
          A07: "水利",
          A0801: "煤炭",
          A0802: "石油",
          A0803: "天然气",
          A0804: "电力",
          A0805: "新能源",
          A09: "邮电通信",
          A12: "矿产冶金",
          A13: "信息网络",
          A9901: "林业",
          A9902: "农业",
          A9903: "其他"
        };
        return dataMap[key];
      }
    },
    data() {
      return {
        form:{}
      };
    },
    methods: {
      // 获取项目详情
    async  getXmInfo(id) {
      const res =  await trackGetProjectInfo(id)
        if(res.code === 0 && res.data){
          this.form = res.data
        }else{
          throw new Error('获取项目详情失败')
        }
      }
    }
  };
</script>
<template>
  <!-- 项目信息  -->
  <el-dialog
    title="项目信息"
    v-bind="$attrs"
    :before-close="() => $emit('update:visible', false)"
    :show-close="true"
    width="60%"
  >
    <el-descriptions title="" :column="2" border>
      <el-descriptions-item label="招标项目名称" :span="2">{{ form.name }}</el-descriptions-item>
      <el-descriptions-item label="招标项目编号">{{ form.code }}</el-descriptions-item>
      <el-descriptions-item label="招标项目类型">{{ form.xmlx | xmlxFilter }}</el-descriptions-item>
      <!--        <el-descriptions-item label="项目类别">{{xminfo.xm.jylx}}</el-descriptions-item>-->
      <el-descriptions-item label="项目审批文号">{{ form.spcode }}</el-descriptions-item>
      <el-descriptions-item label="招标方式">{{ form.cgfs | zbfsFilter }}</el-descriptions-item>
      <el-descriptions-item label="资格审查方式">{{ form.scfs | scfsFilter }}</el-descriptions-item>
      <el-descriptions-item label="项目所在行政区域">{{ form.xmaddress }}</el-descriptions-item>
      <el-descriptions-item label="监督部门名称">{{ form.jgzt }}</el-descriptions-item>
      <el-descriptions-item label="审核部门名称">{{ form.spdw }}</el-descriptions-item>
      <el-descriptions-item label="是否电子标">
        <template v-if="form.dzbstate == 1">是</template>
        <template v-else>否</template>
      </el-descriptions-item>
      <el-descriptions-item label="预算（元）">{{ form.ysje }}</el-descriptions-item>
      <el-descriptions-item label="控制价（元）">{{ form.maxprice }}</el-descriptions-item>
      <el-descriptions-item label="招标人">{{ form.zcdwname }}</el-descriptions-item>
      <el-descriptions-item label="招标人代码">{{ form.zcdwcode }}</el-descriptions-item>
      <el-descriptions-item label="招标联系人">{{ form.zcdwlxr }}</el-descriptions-item>
      <el-descriptions-item label="招标联系人电话">{{ form.zcdwmobile }}</el-descriptions-item>
      <el-descriptions-item label="招标代理">{{ form.zcdlname }}</el-descriptions-item>
      <el-descriptions-item label="招标代理信用代码">{{ form.zcdlcode }}</el-descriptions-item>
      <el-descriptions-item label="招标代理联系人">{{ form.zcdllxr }}</el-descriptions-item>
      <el-descriptions-item label="招标代理联系人电话">{{ form.zcdlmobile }}</el-descriptions-item>
      <el-descriptions-item label="附件"></el-descriptions-item>
    </el-descriptions>
  </el-dialog>
</template>
<style scoped lang="scss"></style>
